import request from '@/utils/request'

// 创建积分明细
export function createAppIntegralDetail(data) {
  return request({
    url: '/pekingfish/app-integral-detail/create',
    method: 'post',
    data: data
  })
}

// 更新积分明细
export function updateAppIntegralDetail(data) {
  return request({
    url: '/pekingfish/app-integral-detail/update',
    method: 'put',
    data: data
  })
}

// 删除积分明细
export function deleteAppIntegralDetail(id) {
  return request({
    url: '/pekingfish/app-integral-detail/delete?id=' + id,
    method: 'delete'
  })
}

// 获得积分明细
export function getAppIntegralDetail(id) {
  return request({
    url: '/pekingfish/app-integral-detail/get?id=' + id,
    method: 'get'
  })
}

// 获得积分明细分页
export function getAppIntegralDetailPage(query) {
  return request({
    url: '/pekingfish/app-integral-detail/page',
    method: 'get',
    params: query
  })
}

// 导出积分明细 Excel
export function exportAppIntegralDetailExcel(query) {
  return request({
    url: '/pekingfish/app-integral-detail/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
